import Taro, { Component } from "@tarojs/taro";
import { View, Button, Text, Image } from "@tarojs/components";
import Head from "../../components/head";
import { connect } from "@tarojs/redux";
import "./contact.less";

@connect(({ appconfig }) => ({
  ...appconfig
}))
class Contact extends Component {
  config = {
    navigationBarTitleText: "联系商家"
  };

  render() {
    const {
      c_phone,
      c_address,
      staticUri,
      c_img,
      c_profile,
      c_name
    } = this.props;
    return (
      <View className="contact-index">
        <Head title="联系商家" urlPath={'/pages/mine/index'} />
        <View className="contact-body">
          <View className="contact-company-info">
            <Image className="company-img" src={staticUri + c_img} />
            <View className="company-info">{c_profile}</View>
          </View>
          <View className="company-divider-line" />
          <View className="company-infomation">
            <View className="compant-info-one">
              <View className="at-row">
                <View className="at-col at-col-1 row-info">
                  <Image
                    className="info-one-img"
                    src={require("../../assets/img/company.png")}
                  />
                </View>
                <View className="at-col at-col-12 row-info">
                  <Text className="info-one-font">公司：{c_name}</Text>
                </View>
              </View>
            </View>
            <View className="compant-info-one">
              <View className="at-row">
                <View className="at-col at-col-1 row-info">
                  <Image
                    className="info-one-img"
                    src={require("../../assets/img/contact-phone.png")}
                  />
                </View>
                <View className="at-col at-col-12 row-info">
                  <Text className="info-one-font">电话：{c_phone}</Text>
                </View>
              </View>
            </View>
            <View className="compant-info-one">
              <View className="at-row">
                <View className="at-col at-col-1 row-info">
                  <Image
                    className="info-one-img"
                    style="width:15.5px;"
                    src={require("../../assets/img/address.png")}
                  />
                </View>
                <View className="at-col at-col-12 row-info">
                  <Text className="info-one-font">地址：{c_address}</Text>
                </View>
              </View>
            </View>
          </View>
        </View>
      </View>
    );
  }
}
export default Contact;
